<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script type="text/javascript">
        for (var i = 1000; i <= 9999; i++) {

            var ge = i % 10
            var shi = parseInt(i / 10) % 10
            var bai = parseInt(i / 100) % 10
            var qian = parseInt(i / 1000)

            if (i == ge * ge * ge * ge + shi * shi * shi * shi + bai * bai * bai * bai + qian * qian * qian * qian) {
                console.log("四位水仙花数有" + i);
            }

        }
    </script>
</head>

<body>
</body>

</html>